const serialUtilDef = {}

serialUtilDef.completeShortSerial = function (shortSN) {
  var XJB_SN_PREFIX = 'A9'
  // 当前序列号是8+4位校验码，不排除以后会大于8位
  var SN_MIN_LENGTH = 8

  var scopeLength = SN_MIN_LENGTH - XJB_SN_PREFIX.length
  shortSN = (Array(scopeLength).join(0) + shortSN).slice(-scopeLength)
  var rawSN = XJB_SN_PREFIX + shortSN
  // console.log(rawSN)
  return rawSN
}

export default serialUtilDef
